package com.jn.adapter.objectadapter;

/**
 * 适配器类
 *
 * @author 江南大学1033190417
 * @date 2022/4/11 22:41
 */
public class VoltageAdapter implements IVoltage5V {
    private Voltage220 voltage220;

    public VoltageAdapter(Voltage220 voltage220){
        this.voltage220=voltage220;
    }

    @Override
    public int output5V() {
        int dstV=0;
        if (voltage220!=null){
            int src = voltage220.output220V();
            dstV=src/44;//适配完成
        }
        return dstV;
    }
}
